import request from '@/utils/request'


export function productList(pageNo, pageSize, search) {
  return request({
    url: '/admin/products/List',
    method: 'get',
    params: {
      pageNo,
      pageSize,
      search
    }
  })
}

export function update2(data) {

  return request({
    url: '/admin/products/update',
    method: 'post',
    data
  })
}

// 删除
export function deleteProduct(id) {
  return request({
    url: `/admin/products/delete`,
    method: 'delete',
    params: {
      id
    }
  });
}

// 添加方法
export function add(data) {

  return request({
    url: '/admin/products/add',
    method: 'post',
    data
  })
}


// 单个查询
export function updateUserFlagById(id) {
  return request({
    url: '/admin/products/queryById',
    method: 'get',
    params: {
      id
    }
  })
}

export function update3(data) {

  return request({
    url: '/admin/products/update3',
    method: 'post',
    data
  })
}
